package com.globant.util.log.reports;

import java.util.List;

import org.springframework.dao.DataAccessException;

/**
 * 
 * Interface for the Log Reports model.
 * 
 * @author gonzalo.zarza
 * @version 20130128v1.0
 *
 */

public interface ILogReportsDAO {
	
	/* 
	================================================================================================
	 Methods
	================================================================================================
	*/
	/**
	 * Inserts a new record in the log_status table.
	 * 
	 * @param report					the report to insert
	 * @throws DataAccessException		if cannot complete the operation
	 */
	public void insertNewReport(LogReports report) throws DataAccessException;
	
	/* ------------------------------------------------------------------------------------------ */
	
	/**
	 * Updates the status of a report identified by log id.
	 * 
	 * @param logId						the log id of the report
	 * @param reportId                  the id of the report to modify
	 * @param newStatus					the new status to set
	 * @throws DataAccessException		if cannot complete the operation
	 */
	public void updateReportStatus(String logId, int reportId, int newStatus) throws DataAccessException;

	/* ------------------------------------------------------------------------------------------ */
	
	/**
	 * Retrieve records using the log id column.
	 * 
	 * @param logId
	 * @return
	 * @throws DataAccessException		if cannot complete the operation
	 */
	public List<LogReports> getReportsByLogId(String logId) throws DataAccessException;
	
	/* ------------------------------------------------------------------------------------------ */
	
	/**
	 * Delete the records corresponding to the log id.
	 * 
	 * @param logId						the log id
	 * @throws DataAccessException		if cannot complete the operation
	 */
	public void deleteReportsByLogId(String logId) throws DataAccessException;
	
}
